﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Framework.LinkTrackingLog.MyTest
{
    /// <summary>
    /// 方法监控特性
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
    public class MethodMonitoringAttribute : Attribute
    {
        /// <summary>
        /// 方法监控特性
        /// </summary>
        /// <param name="monitor">是否监控</param>
        /// <param name="recordInput">是否记录入参</param>
        /// <param name="recordResult">是否记录返回值</param>
        public MethodMonitoringAttribute(bool monitor = true, bool recordInput = false,bool recordResult = false) 
        {
            Monitor = monitor;
            RecordInput = recordInput;
            RecordResult = recordResult;
        }

        /// <summary>
        /// 是否监控
        /// </summary>
        public bool Monitor { get; set; }
        /// <summary>
        /// 是否记录入参
        /// </summary>
        public bool RecordInput { get; set; }
        /// <summary>
        /// 是否记录返回值
        /// </summary>
        public bool RecordResult { get; set; }
    }
}
